```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Java数组完全指南 - 技术小馆</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            line-height: 1.8;
            color: #333;
        }
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero {
            background: linear-gradient(135deg, #6B73FF 0%, #000DFF 100%);
        }
        .code-block {
            background-color: #2d2d2d;
            border-radius: 8px;
            color: #f8f8f2;
        }
        .concept-card {
            transition: all 0.3s ease;
        }
        .concept-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        .highlight {
            background-color: #FFF9C4;
            padding: 2px 4px;
            border-radius: 4px;
        }
        .section-divider {
            position: relative;
            height: 80px;
            overflow: hidden;
        }
        .section-divider svg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero text-white py-20 px-4 md:px-10">
        <div class="container mx-auto max-w-6xl">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-10 md:mb-0">
                    <h1 class="text-4xl md:text-5xl font-bold mb-4">掌握Java数组</h1>
                    <p class="text-xl mb-6 opacity-90">从基础概念到高级应用的全方位指南</p>
                    <div class="flex space-x-4">
                        <div class="bg-white bg-opacity-20 p-3 rounded-lg">
                            <i class="fas fa-cube text-xl"></i>
                            <p class="mt-2 text-sm">高效数据结构</p>
                        </div>
                        <div class="bg-white bg-opacity-20 p-3 rounded-lg">
                            <i class="fas fa-bolt text-xl"></i>
                            <p class="mt-2 text-sm">快速元素访问</p>
                        </div>
                        <div class="bg-white bg-opacity-20 p-3 rounded-lg">
                            <i class="fas fa-project-diagram text-xl"></i>
                            <p class="mt-2 text-sm">多维数组支持</p>
                        </div>
                    </div>
                </div>
                <div class="md:w-1/2">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1709693394311-848d92a8-4342-42a2-ba5f-67f492691e1d.png" alt="Java数组可视化" class="rounded-lg shadow-2xl">
                </div>
            </div>
        </div>
    </section>

    <!-- Content Navigation -->
    <section class="bg-white py-8 shadow-sm">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="flex flex-wrap justify-center gap-3">
                <a href="#concept" class="px-4 py-2 bg-blue-50 text-blue-600 rounded-full hover:bg-blue-100 transition">基本概念</a>
                <a href="#features" class="px-4 py-2 bg-blue-50 text-blue-600 rounded-full hover:bg-blue-100 transition">数组特点</a>
                <a href="#operations" class="px-4 py-2 bg-blue-50 text-blue-600 rounded-full hover:bg-blue-100 transition">基本操作</a>
                <a href="#traversal" class="px-4 py-2 bg-blue-50 text-blue-600 rounded-full hover:bg-blue-100 transition">数组遍历</a>
                <a href="#sorting" class="px-4 py-2 bg-blue-50 text-blue-600 rounded-full hover:bg-blue-100 transition">数组排序</a>
                <a href="#multi" class="px-4 py-2 bg-blue-50 text-blue-600 rounded-full hover:bg-blue-100 transition">多维数组</a>
                <a href="#issues" class="px-4 py-2 bg-blue-50 text-blue-600 rounded-full hover:bg-blue-100 transition">注意事项</a>
                <a href="#homework" class="px-4 py-2 bg-blue-50 text-blue-600 rounded-full hover:bg-blue-100 transition">实战作业</a>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto max-w-6xl px-4 py-12">
        <!-- Concept Section -->
        <section id="concept" class="mb-20 scroll-mt-32">
            <div class="flex items-center mb-8">
                <div class="w-2 h-12 bg-blue-600 mr-4"></div>
                <h2 class="text-3xl font-bold">数组的基本概念</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-white p-6 rounded-xl shadow-md concept-card">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-info-circle text-blue-500 text-xl mr-2"></i>
                        <h3 class="text-xl font-semibold">什么是数组？</h3>
                    </div>
                    <p class="text-gray-700 mb-4">数组是Java中一种重要的数据结构，用于存储相同类型的多个元素。它提供了一个连续的存储空间，每个元素通过索引来访问，索引从0开始递增。</p>
                    <p class="text-gray-700">数组长度在创建时确定且不可变，因此必须在声明时指定长度。数组的元素可以是基本数据类型或对象，但所有元素类型必须相同。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md concept-card">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-balance-scale text-blue-500 text-xl mr-2"></i>
                        <h3 class="text-xl font-semibold">优缺点分析</h3>
                    </div>
                    <div class="space-y-3">
                        <div class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <p class="text-gray-700">快速访问元素，时间复杂度O(1)</p>
                        </div>
                        <div class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <p class="text-gray-700">内存紧凑，节省空间</p>
                        </div>
                        <div class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <p class="text-gray-700">性能高效，适用于大量数据处理</p>
                        </div>
                        <div class="flex items-start">
                            <i class="fas fa-times text-red-500 mt-1 mr-2"></i>
                            <p class="text-gray-700">长度固定，创建后无法动态调整</p>
                        </div>
                        <div class="flex items-start">
                            <i class="fas fa-times text-red-500 mt-1 mr-2"></i>
                            <p class="text-gray-700">需要连续的内存空间</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="mt-8 bg-blue-50 p-6 rounded-xl">
                <p class="font-medium text-blue-800">掌握数组的使用对于Java程序员至关重要，它是构建更复杂数据结构和算法的基础。</p>
            </div>
        </section>

        <!-- Features Section -->
        <section id="features" class="mb-20 scroll-mt-32">
            <div class="flex items-center mb-8">
                <div class="w-2 h-12 bg-blue-600 mr-4"></div>
                <h2 class="text-3xl font-bold">数组的特点</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1709693463276-06f23a65-d539-4bfa-9f52-a479e3df2f53.png" alt="数组特点图示" class="rounded-lg shadow-md w-full">
                </div>
                
                <div>
                    <div class="space-y-6">
                        <div class="flex items-start">
                            <div class="bg-blue-100 text-blue-800 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <span>1</span>
                            </div>
                            <div>
                                <h4 class="font-semibold text-lg mb-1">固定长度</h4>
                                <p class="text-gray-700">数组在创建时需要指定长度，并且长度在数组生命周期内不可变。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start">
                            <div class="bg-blue-100 text-blue-800 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <span>2</span>
                            </div>
                            <div>
                                <h4 class="font-semibold text-lg mb-1">相同类型</h4>
                                <p class="text-gray-700">数组中的元素必须是相同类型，可以是基本数据类型或者对象类型。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start">
                            <div class="bg-blue-100 text-blue-800 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <span>3</span>
                            </div>
                            <div>
                                <h4 class="font-semibold text-lg mb-1">连续内存空间</h4>
                                <p class="text-gray-700">数组中的元素在内存中是连续存储的，这样可以通过索引高效地访问元素。</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="mt-8 grid md:grid-cols-3 gap-6">
                <div class="bg-white p-6 rounded-lg shadow-sm">
                    <div class="text-blue-500 mb-3">
                        <i class="fas fa-barcode text-2xl"></i>
                    </div>
                    <h4 class="font-semibold mb-2">下标访问</h4>
                    <p class="text-gray-700">数组中的每个元素都有一个唯一的索引，从0开始递增，可以通过下标快速访问和修改元素。</p>
                </div>
                
                <div class="bg-white p-6 rounded-lg shadow-sm">
                    <div class="text-blue-500 mb-3">
                        <i class="fas fa-layer-group text-2xl"></i>
                    </div>
                    <h4 class="font-semibold mb-2">静态结构</h4>
                    <p class="text-gray-700">数组的结构是静态的，即在声明时确定数组长度和类型，不支持动态扩展或缩减。</p>
                </div>
                
                <div class="bg-white p-6 rounded-lg shadow-sm">
                    <div class="text-blue-500 mb-3">
                        <i class="fas fa-cubes text-2xl"></i>
                    </div>
                    <h4 class="font-semibold mb-2">一维或多维</h4>
                    <p class="text-gray-700">数组可以是一维的，也可以是多维的，多维数组由一维数组嵌套构成。</p>
                </div>
            </div>
        </section>

        <!-- Operations Section -->
        <section id="operations" class="mb-20 scroll-mt-32">
            <div class="flex items-center mb-8">
                <div class="w-2 h-12 bg-blue-600 mr-4"></div>
                <h2 class="text-3xl font-bold">数组基本操作</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <div class="bg-white p-6 rounded-xl shadow-md mb-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-500 text-white w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <i class="fas fa-code"></i>
                            </div>
                            <h3 class="text-xl font-semibold">声明数组</h3>
                        </div>
                        <p class="text-gray-700 mb-4">声明数组需要指定数组的类型和数组名。</p>
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre class="text-sm overflow-x-auto"><code class="language-java">int[] numbers;</code></pre>
                        </div>
                    </div>
                    
                    <div class="bg-white p-6 rounded-xl shadow-md mb-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-500 text-white w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <i class="fas fa-plus"></i>
                            </div>
                            <h3 class="text-xl font-semibold">创建数组</h3>
                        </div>
                        <p class="text-gray-700 mb-4">使用 <code class="highlight">new</code> 关键字来创建数组并指定数组的长度。</p>
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre class="text-sm overflow-x-auto"><code class="language-java">int[] numbers = new int[5];</code></pre>
                        </div>
                    </div>
                    
                    <div class="bg-white p-6 rounded-xl shadow-md">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-500 text-white w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <i class="fas fa-edit"></i>
                            </div>
                            <h3 class="text-xl font-semibold">初始化数组</h3>
                        </div>
                        <p class="text-gray-700 mb-4">可以在创建数组时直接赋值或者在后续代码中对数组元素进行初始化。</p>
                        <div class="code-block p-4 rounded-lg">
                            <pre class="text-sm overflow-x-auto"><code class="language-java">numbers[0] = 1;
numbers[1] = 2;
numbers[2] = 3;
numbers[3] = 4;
numbers[4] = 5;</code></pre>
                        </div>
                    </div>
                </div>
                
                <div>
                    <div class="bg-white p-6 rounded-xl shadow-md mb-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-500 text-white w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <i class="fas fa-search"></i>
                            </div>
                            <h3 class="text-xl font-semibold">访问数组元素</h3>
                        </div>
                        <p class="text-gray-700 mb-4">通过索引访问数组中的元素，数组的索引从0开始。</p>
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre class="text-sm overflow-x-auto"><code class="language-java">int firstElement = numbers[0];
System.out.println("The first element of the array is: " + firstElement);</code></pre>
                        </div>
                    </div>
                    
                    <div class="bg-white p-6 rounded-xl shadow-md mb-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-500 text-white w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <i class="fas fa-sync-alt"></i>
                            </div>
                            <h3 class="text-xl font-semibold">修改数组元素</h3>
                        </div>
                        <p class="text-gray-700 mb-4">通过索引修改数组中的元素的值。</p>
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre class="text-sm overflow-x-auto"><code class="language-java">numbers[1] = 10;</code></pre>
                        </div>
                    </div>
                    
                    <div class="bg-white p-6 rounded-xl shadow-md">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-500 text-white w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <i class="fas fa-list-ol"></i>
                            </div>
                            <h3 class="text-xl font-semibold">遍历数组</h3>
                        </div>
                        <p class="text-gray-700 mb-4">使用循环结构遍历数组中的所有元素，通常使用 <code class="highlight">for</code> 循环或者增强型 <code class="highlight">for</code> 循环来遍历数组。</p>
                        <div class="code-block p-4 rounded-lg">
                            <pre class="text-sm overflow-x-auto"><code class="language-java">for (int i = 0; i < numbers.length; i++) {
    System.out.println("Element at index " + i + ": " + numbers[i]);
}</code></pre>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Traversal Section -->
        <section id="traversal" class="mb-20 scroll-mt-32">
            <div class="flex items-center mb-8">
                <div class="w-2 h-12 bg-blue-600 mr-4"></div>
                <h2 class="text-3xl font-bold">数组的遍历</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <div class="bg-orange-500 text-white w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                            <i class="fas fa-code"></i>
                        </div>
                        <h3 class="text-xl font-semibold">使用for循环遍历数组</h3>
                    </div>
                    <div class="code-block p-4 rounded-lg">
                        <pre class="text-sm overflow-x-auto"><code class="language-java">public class ArrayTraversalExample {
    public static void main(String[] args) {
        int[] numbers = {1, 2, 3, 4, 5};

        System.out.println("Using for loop to traverse the array:");
        for (int i = 0; i < numbers.length; i++) {
            System.out.println("Element at index " + i + ": " + numbers[i]);
        }
    }
}</code></pre>
                    </div>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <div class="bg-green-500 text-white w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                            <i class="fas fa-code"></i>
                        </div>
                        <h3 class="text-xl font-semibold">使用增强型for循环遍历数组</h3>
                    </div>
                    <div class="code-block p-4 rounded-lg">
                        <pre class="text-sm overflow-x-auto"><code class="language-java">public class ArrayTraversalExample {
    public static void main(String[] args) {
        int[] numbers = {1, 2, 3, 4, 5};

        System.out.println("Using enhanced for loop to traverse the array:");
        for (int num : numbers) {
            System.out.println("Element: " + num);
        }
    }
}</code></pre>
                    </div>
                </div>
            </div>
            
            <div class="mt-8 bg-blue-50 p-6 rounded-xl">
                <div class="flex items-start">
                    <i class="fas fa-info-circle text-blue-500 text-xl mr-3 mt-1"></i>
                    <div>
                        <p class="font-medium text-blue-800">无论是哪种方式，遍历数组都是通过循环访问数组中的每个元素，并执行相应的操作。增强型for循环在语法上更加简洁，但是for循环可以提供更多的灵活性，例如可以根据索引进行操作。</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Sorting Section -->
        <section id="sorting" class="mb-20 scroll-mt-32">
            <div class="flex items-center mb-8">
                <div class="w-2 h-12 bg-blue-600 mr-4"></div>
                <h2 class="text-3xl font-bold">数组的排序</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md overflow-hidden">
                <div class="bg-gray-800 text-white px-6 py-4">
                    <h3 class="text-xl font-semibold">常用排序算法对比</h3>
                </div>
                <div class="grid md:grid-cols-2 gap-8 p-6">
                    <div>
                        <div class="mb-6">
                            <h4 class="font-semibold text-lg mb-3 flex items-center">
                                <span class="bg-blue-100 text-blue-800 w-6 h-6 rounded-full flex items-center justify-center text-sm mr-3">1</span>
                                冒泡排序（Bubble Sort）
                            </h4>
                            <p class="text-gray-700 mb-3">依次比较相邻的元素，如果顺序不对则交换，直到没有需要交换的元素。</p>
                            <div class="code-block p-4 rounded-lg">
                                <pre class="text-sm overflow-x-auto"><code class="language-java">public static void bubbleSort(int[] arr) {
    int n = arr.length;
    for (int i = 0; i < n-1; i++) {
        for (int j = 0; j < n-i-1; j++) {
            if (arr[j] > arr[j+1]) {
                int temp = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = temp;
            }
        }
    }
}</code></pre>
                            </div>
                        </div>
                        
                        <div class="mb-6">
                            <h4 class="font-semibold text-lg mb-3 flex items-center">
                                <span class="bg-blue-100 text-blue-800 w-6 h-6 rounded-full flex items-center justify-center text-sm mr-3">2</span>
                                选择排序（Selection Sort）
                            </h4>
                            <p class="text-gray-700 mb-3">每次选择数组中的最小元素，放置在已排序部分的末尾。</p>
                            <div class="code-block p-4 rounded-lg">
                                <pre class="text-sm overflow-x-auto"><code class="language-java">public static void selectionSort(int[] arr) {
    int n = arr.length;
    for (int i = 0; i < n-1; i++) {
        int minIndex = i;
        for (int j = i+1; j < n; j++) {
            if (arr[j] < arr[minIndex]) {
                minIndex = j;
            }
        }
        int temp = arr[minIndex];
        arr[minIndex] = arr[i];
        arr[i] = temp;
    }
}</code></pre>
                            </div>
                        </div>
                    </div>
                    
                    <div>
                        <div class="mb-6">
                            <h4 class="font-semibold text-lg mb-3 flex items-center">
                                <span class="bg-blue-100 text-blue-800 w-6 h-6 rounded-full flex items-center justify-center text-sm mr-3">3</span>
                                插入排序（Insertion Sort）
                            </h4>
                            <p class="text-gray-700 mb-3">将未排序的元素逐个插入已排序部分的合适位置，保持已排序部分始终有序。</p>
                            <div class="code-block p-4 rounded-lg">
                                <pre class="text-sm overflow-x-auto"><code class="language-java">public static void insertionSort(int[] arr) {
    int n = arr.length;
    for (int i = 1; i < n; i++) {
        int key = arr[i];
        int j = i - 1;
        while (j >= 0 && arr[j] > key) {
            arr[j+1] = arr[j];
            j = j - 1;
        }
        arr[j+1] = key;
    }
}</code></pre>
                            </div>
                        </div>
                        
                        <div class="mb-6">
                            <h4 class="font-semibold text-lg mb-3 flex items-center">
                                <span class="bg-blue-100 text-blue-800 w-6 h-6 rounded-full flex items-center justify-center text-sm mr-3">4</span>
                                快速排序（Quick Sort）
                            </h4>
                            <p class="text-gray-700 mb-3">选择一个基准元素，将数组分割成两部分，小于基准的放在左边，大于基准的放在右边，然后对左右两部分递归地进行快速排序。</p>
                            <div class="code-block p-4 rounded-lg">
                                <pre class="text-sm overflow-x-auto"><code class="language-java">public static void quickSort(int[] arr, int low, int high) {
    if (low < high) {
        int pi = partition(arr, low, high);
        quickSort(arr, low, pi - 1);
        quickSort(arr, pi + 1, high);
    }
}

private static int partition(int[] arr, int low, int high) {
    int pivot = arr[high];
    int i = low - 1;
    for (int j = low; j < high; j++) {
        if (arr[j] < pivot) {
            i++;
            int temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
    }
    int temp = arr[i+1];
    arr[i+1] = arr[high];
    arr[high] = temp;
    return i + 1;
}</code></pre>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="bg-gray-50 p-6">
                    <div class="flex items-start">
                        <i class="fas fa-lightbulb text-yellow-500 text-xl mr-3 mt-1"></i>
                        <div>
                            <p class="font-medium text-gray-800">这些排序算法都有自己的特点和适用场景，在实际应用中需根据数据规模和性能要求选择合适的算法进行排序。</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Multi Array Section -->
        <section id="multi" class="mb-20 scroll-mt-32">
            <div class="flex items-center mb-8">
                <div class="w-2 h-12 bg-blue-600 mr-4"></div>
                <h2 class="text-3xl font-bold">多维数组</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <div class="bg-white p-6 rounded-xl shadow-md mb-6">
                        <p class="text-gray-700 mb-4">多维数组是指数组中的每个元素又是一个数组的数组。多维数组可以是二维、三维甚至更高维度的数组。在 Java 中，多维数组的声明和初始化方式与一维数组类似，只是需要指定每个维度的大小。</p>
                        <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1709693836193-b804ccf5-ec51-4a1a-b92e-ae66a1bfee85.png" alt="多维数组图示" class="rounded-lg shadow-sm w-full">
                    </div>
                </div>
                
                <div>
                    <div class="bg-white p-6 rounded-xl shadow-md">
                        <h3 class="text-xl font-semibold mb-4">多维数组示例</h3>
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre class="text-sm overflow-x-auto"><code class="language-java">int[][] twoDArray = new int[3][4]; // 声明一个3行4列的二维数组</code></pre>
                        </div>
                        <p class="text-gray-700 mb-4">这个二维数组可以看作是一个包含3个一维数组的数组，每个一维数组又包含4个元素。访问多维数组的元素可以使用多个索引，例如：</p>
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre class="text-sm overflow-x-auto"><code class="language-java">int value = twoDArray[1][2]; // 访问第2行第3列的元素</code></pre>
                        </div>
                        <p class="text-gray-700">多维数组在编程中常用于表示表格、矩阵等数据结构，提供了更灵活的数据存储和访问方式。在算法和数据处理领域，多维数组也经常被使用。</p>
                    </div>
                </div>
            </div>
            
            <div class="mt-8 bg-blue-50 p-6 rounded-xl">
                <div class="text-center">
                    <div class="mermaid">
                        graph TD
                            A[多维数组] --> B[二维数组]
                            A --> C[三维数组]
                            A --> D[更高维度数组]
                            B --> E[矩阵]
                            B --> F[表格数据]
                            C --> G[立体数据结构]
                            D --> H[复杂数据模型]
                    </div>
                </div>
            </div>
        </section>

        <!-- Issues Section -->
        <section id="issues" class="mb-20 scroll-mt-32">
            <div class="flex items-center mb-8">
                <div class="w-2 h-12 bg-blue-600 mr-4"></div>
                <h2 class="text-3xl font-bold">数组的常见问题和注意事项</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-6">
                <div class="bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-exclamation-triangle text-red-500 mr-3"></i>
                        <h3 class="text-xl font-semibold">数组下标越界</h3>
                    </div>
                    <p class="text-gray-700">访问数组时要确保使用的索引不超出数组的范围，否则会导致数组下标越界异常。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-exclamation-circle text-red-500 mr-3"></i>
                        <h3 class="text-xl font-semibold">空指针异常</h3>
                    </div>
                    <p class="text-gray-700">在使用数组之前，要确保数组已经被正确地初始化，否则可能会出现空指针异常。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-ruler text-blue-500 mr-3"></i>
                        <h3 class="text-xl font-semibold">数组长度固定</h3>
                    </div>
                    <p class="text-gray-700">数组一旦创建后，其长度就固定不变，无法动态扩展或缩小，需要提前确定数组的大小。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-layer-group text-blue-500 mr-3"></i>
                        <h3 class="text-xl font-semibold">多维数组注意事项</h3>
                    </div>
                    <p class="text-gray-700">在处理多维数组时，要确保每个维度的大小都正确，避免出现维度不一致的情况。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-random text-blue-500 mr-3"></i>
                        <h3 class="text-xl font-semibold">数组与集合的选择</h3>
                    </div>
                    <p class="text-gray-700">在一些场景中，可以考虑使用集合类而不是数组，因为集合类提供了更多的灵活性和功能。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-copy text-blue-500 mr-3"></i>
                        <h3 class="text-xl font-semibold">数组复制</h3>
                    </div>
                    <p class="text-gray-700">数组复制时要注意源数组和目标数组的长度问题，确保不会发生数据丢失或溢出。</p>
                </div>
            </div>
        </section>

        <!-- Homework Section -->
        <section id="homework" class="mb-20 scroll-mt-32">
            <div class="flex items-center mb-8">
                <div class="w-2 h-12 bg-blue-600 mr-4"></div>
                <h2 class="text-3xl font-bold">实战作业</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md overflow-hidden">
                <div class="bg-gray-800 text-white px-6 py-4">
                    <h3 class="text-xl font-semibold">作业要求</h3>
                </div>
                <div class="p-6">
                    <div class="space-y-6">
                        <div class="flex items-start">
                            <div class="bg-blue-100 text-blue-800 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <span>1</span>
                            </div>
                            <div>
                                <h4 class="font-semibold text-lg mb-1">基础练习</h4>
                                <p class="text-gray-700">数组的遍历，查找，求最大最小数，请独立敲两遍(加注释)，其他课堂练习敲一遍（重点）。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start">
                            <div class="bg-blue-100 text-blue-800 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <span>2</span>
                            </div>
                            <div>
                                <h4 class="font-semibold text-lg mb-1">方法封装</h4>
                                <p class="text-gray-700">定义两个方法，一个求最大值，一个求最小值(再写两遍)</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start">
                            <div class="bg-blue-100 text-blue-800 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <span>3</span>
                            </div>
                            <div>
                                <h4 class="font-semibold text-lg mb-1">排序算法</h4>
                                <p class="text-gray-700">学习冒泡排序</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start">
                            <div class="bg-blue-100 text-blue-800 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4">
                                <span>4</span>
                            </div>
                            <div>
                                <h4 class="font-semibold text-lg mb-1">挑战级项目</h4>
                                <p class="text-gray-700">数组的学员管理，要求对里面存储的学员姓名信息进行管理，可以对数据进行增加，删除，和查询的功能</p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mt-8 bg-gray-100 p-6 rounded-lg">
                        <h4 class="font-semibold text-lg mb-4">学员管理系统功能展示</h4>
                        <div class="code-block p-4 rounded-lg">
                            <pre class="text-sm overflow-x-auto"><code class="language-plaintext">学员管理系统：
1.添加学员信息
2.删除学员信息
3.查询学员信息
4.退出
请输入您的选择：1
请输入学员姓名：zhangsan
添加成功！

学员管理系统：
1.添加学员信息
2.删除学员信息
3.查询学员信息
4.退出
请输入您的选择：3
查询学员信息-->>
zhangsan
lisi

学员管理系统：
1.添加学员信息
2.删除学员信息
3.查询学员信息
4.退出
请输入您的选择：2
请输入学员姓名：wangwu
该学员不存在;

学员管理系统：
1.添加学员信息
2.删除学员信息
3.查询学员信息
4.退出
请输入您的选择：4
谢谢使用！</code></pre>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-white py-10">
        <div class="container mx-auto max-w-6xl px-4">
            <div class="flex flex-col items-center">
                <h3 class="text-xl font-semibold mb-2">技术小馆</h3>
                <a href="http://www.yuque.com/jtostring" class="text-gray-400 hover:text-white transition">http://www.yuque.com/jtostring</a>
                <div class="mt-6 flex space-x-4">
                    <a href="#" class="w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center hover:bg-blue-600 transition">
                        <i class="fab fa-github"></i>
                    </a>
                    <a href="#" class="w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center hover:bg-blue-500 transition">
                        <i class="fab fa-twitter"></i>
                    </a>
                    <a href="#" class="w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center hover:bg-red-600 transition">
                        <i class="fab fa-youtube"></i>
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```